Virtual fields
A virtual field is not a column in a table and it is not used to store data: it is used to display data from another module.
For example, a record in the Births module attaches to a record in the Parties module (a Hospital) via the Hosp./Clinic: (Child) field. SummaryData from a Parties record displays in the Hosp./Clinic: (Child) field.
In an attachment there is a reference column in the Primary module (the module from which the attachment is made) which stores the IRN of the attached record. This column is hidden from users. Data from the attached record does display in a virtual field (the virtual field points to the hidden reference field which points to the attached record in the Parties module).
In this example, the Hosp./Clinic: (Child) field is a virtual field called BirthFacilityName, and it points to a reference field called BirthFacilityName_Ref, which in turn points to the SummaryData field in an attached record in the Parties module.
When a search is made of a virtual field, two Also Searches may take place. In this Births example:
- An Also Search Registry entry for BirthFacilityName can specify additional fields in the Births module to be searched.
- If there is an Also Search Registry entry for SummaryData in the Parties module (the column referenced by BirthFacilityName), a search of BirthFacilityName in the Births module will also search the Parties module columns listed in the Also Search Registry entry for SummaryData.